home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Wayzata's Best of Shareware PC/Windows 2
/
Wayzata's Best of Shareware 2.0 (Windows) (Wayzata Technology)(7112)(1994).bin
/
pc
/
dos
/
programg
/
decgif3
/
usedgif.bas
< prev
next >
Wrap
BASIC Source File
|
1992-08-01
|
2KB
|
73 lines
'*****************************************************************************
'* This program demonstrates how to use the GIF decompression subroutine.
'* It must be compiled for maximum speed!
'* By Rich Geldreich 1992
'*
'* Any bugs/problems, write or call:
'*
'* Rich Geldreich
'* 410 Market St.
'* Gloucester City, NJ 08030
'* (609)-456-8752
DEFINT A-Z
DECLARE SUB X360x480 ()
DECLARE FUNCTION LoadGIF (F$, Vm, ShowType, Xorigin, Yorigin, XScale, YScale)
DIM R(255), G(255), B(255)
'mode 0=320x200x256 vga
'mode 1=360x480x256 vga
'mode 2=640x480x16 vga
'mode 3=320x200x16 ega
'mode 4=640x350x16 ega
DO
SCREEN 0: WIDTH 80: CLS
PRINT "QuickBASIC 4.5 GIF Decompressor"
PRINT "By Rich Geldreich 1992"
PRINT : LINE INPUT "Filename? "; A$
A$ = LTRIM$(RTRIM$(A$))
IF A$ = "" THEN CLS : END
PRINT "Modes:"
PRINT "1. 320x200x256 VGA"
PRINT "2. 360x480x256 VGA"
PRINT "3. 640x480x16 VGA"
PRINT "4. 320x200x16 EGA"
PRINT "5. 640x350x16 EGA"
DO
LINE INPUT "Graphics mode? "; B$:
Mode = VAL(B$)
LOOP WHILE Mode < 1 AND Mode > 5
INPUT "X Scale(-1 for autofit)"; XScale: IF XScale = 0 THEN XScale = 256
INPUT "Y Scale(-1 for autofit)"; YScale: IF YScale = 0 THEN YScale = 256
INPUT "X origin"; Xorigin
INPUT "Y origin"; Yorigin
SELECT CASE Mode
CASE 1
SCREEN 13
CASE 2
SCREEN 13 '<-- this is only here so QB switces back to text
' mode when everthing is done
X360x480
CASE 3
SCREEN 12
CASE 4
SCREEN 7
CASE 5
SCREEN 9
END SELECT
ErrorCode = LoadGIF(A$, Mode - 1, 0, Xorigin, Yorigin, XScale, YScale)
IF ErrorCode THEN
SCREEN 0: WIDTH 80: PRINT "Error:"; ErrorCode
END IF
BEEP
A$ = INPUT$(1)
LOOP
END